<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>{$title}</title>
    <meta name="keywords" content="FAKE Framework"/>
    <meta name="description" content="FAKE is a lightweight php framework."/>
    <meta name="author" content="tianji">
    <meta name="renderer" content="webkit">
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <!-- icon -->
    <link rel="icon" type="image/x-icon" href="/static/icon.png">
    <!-- css -->
    <link rel="stylesheet" media="screen" href="/static/login/css/style.css">
    <link rel="stylesheet" media="screen" href="/static/layui/css/layui.css">
    <link rel="stylesheet" href="/static/login/css/index.css">
</head>

<body>
<div class="loginbox">
    <div>
        <fieldset class="layui-elem-field layui-field-title">
            <legend>欢迎登录</legend>
        </fieldset>
        <form class="layui-form layui-form-pane" action='{:url("login/checkLogin")}' method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">用户账号:</label>
                <div class="layui-input-inline">
                    <input type="username" name="username" required="required" lay-verify="username" placeholder="请输入用户" autocomplete="off" class="layui-input">
                </div>
                <i class="layui-icon layui-icon-user" style="font-size: 30px; color: #1E9FFF;"></i>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">用户密码</label>
                <div class="layui-input-inline">
                    <input type="password" name="password" required="required" lay-verify="password" placeholder="请输入密码" autocomplete="off" class="layui-input">
                </div>
                <i class="layui-icon layui-icon-password" style="font-size: 30px; color: #1E9FFF;"></i>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">验证码:</label>
                <div class="layui-input-inline">
                    <input type="text" name="captcha" placeholder="输入验证码" class="layui-input">
                </div>
                <img width="70px" height="35px" class="yzm-img" style="border:1px solid #4444" src="/admin/login/captcha" title="点击刷新" alt="验证码">
            </div>
            <div class="layui-form-item">
                <button class="layui-btn layui-btn-fluid" lay-submit="submit" lay-filter="formsubmit">立即登录</button>
            </div>
        </form>
        <p style="padding: 10px; ">
            <a style="float: left;" href="#">立即注册?</a>
            <a style="float: right;" href="#">忘记密码?</a>
        </p>
    </div>
</div>

<!-- particles.js container -->
<div id="particles-js"></div>

<!-- scripts -->
<script src="/static/login/particles.min.js"></script>
<script src="/static/login/js/app.js"></script>
<script src="/static/layui/layui.js"></script>
<script>
    layui.use(['jquery','layer', 'form'], function(){
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;

        $(".yzm-img").click(function(){
            console.log('刷新验证码');
            this.src = "{:url('login/captcha')}?"+Math.random();
        });

        form.render();
    });
</script>
</body>
</html>